#!/usr/bin/env python
#-*- coding:utf-8 -*-


def main(d):
    try:
        res = {}
        for k,v in d.items():
            res[v] = k
        print(res)
    except:
        print('输入错误')

if __name__ == '__main__':
    d = {"a": 1, "b": 2}
    main(d)